package test;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import expression.*;

public class BrandonRomanoPETest 
{

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test1() 
	{
		int answer = PostfixEvaluator.eval("1 28 2 ^ 6 3 / 2 + * *");
		assertTrue(answer == 3136);
	}
	
	@Test
	public void test2() 
	{
		int answer = PostfixEvaluator.eval("4 3 2 ^ ^");
		assertTrue(answer == 262144);
	}
	
	@Test
	public void test3()
	{
		int answer = PostfixEvaluator.eval("1 2 3 * +");
		assertTrue(answer == 7);
	}
	
	@Test
	public void test4()
	{
		int answer = PostfixEvaluator.eval("8 2 1 / /");
		assertTrue(answer == 4);
	}
	
	@Test
	public void test5()
	{
		int answer = PostfixEvaluator.eval("7 7 7 * +");
		assertTrue(answer == 56);
	}
	
	@Test
	public void test6()
	{
		int answer = PostfixEvaluator.eval("1 8 + 8 2 8 ^ * *");
		assertTrue(answer == 18432);
	}

}
